3.863 \(\int \sec ^2(c+d x) (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx\)

Optimal. Leaf size=87 \[ \frac {a^4}{4 d (a-a \sin (c+d x))^2}-\frac {5 a^3}{4 d (a-a \sin (c+d x))}-\frac {7 a^2 \log (1-\sin (c+d x))}{8 d}-\frac {a^2 \log (\sin (c+d x)+1)}{8 d} \]

[Out]

-7/8*a^2*ln(1-sin(d*x+c))/d-1/8*a^2*ln(1+sin(d*x+c))/d+1/4*a^4/d/(a-a*sin(d*x+c))^2-5/4*a^3/d/(a-a*sin(d*x+c))

________________________________________________________________________________________

Rubi [A]  time = 0.14, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2836, 12, 88} \[ \frac {a^4}{4 d (a-a \sin (c+d x))^2}-\frac {5 a^3}{4 d (a-a \sin (c+d x))}-\frac {7 a^2 \log (1-\sin (c+d x))}{8 d}-\frac {a^2 \log (\sin (c+d x)+1)}{8 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^2*(a + a*Sin[c + d*x])^2*Tan[c + d*x]^3,x]

[Out]

(-7*a^2*Log[1 - Sin[c + d*x]])/(8*d) - (a^2*Log[1 + Sin[c + d*x]])/(8*d) + a^4/(4*d*(a - a*Sin[c + d*x])^2) -
(5*a^3)/(4*d*(a - a*Sin[c + d*x]))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 88

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 2836

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d*x)/b
)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2,
 0]

Rubi steps

\begin {align*} \int \sec ^2(c+d x) (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx &=\frac {a^5 \operatorname {Subst}\left (\int \frac {x^3}{a^3 (a-x)^3 (a+x)} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^2 \operatorname {Subst}\left (\int \frac {x^3}{(a-x)^3 (a+x)} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^2 \operatorname {Subst}\left (\int \left (\frac {a^2}{2 (a-x)^3}-\frac {5 a}{4 (a-x)^2}+\frac {7}{8 (a-x)}-\frac {1}{8 (a+x)}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=-\frac {7 a^2 \log (1-\sin (c+d x))}{8 d}-\frac {a^2 \log (1+\sin (c+d x))}{8 d}+\frac {a^4}{4 d (a-a \sin (c+d x))^2}-\frac {5 a^3}{4 d (a-a \sin (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.39, size = 91, normalized size = 1.05 \[ \frac {a^2 \left (3 \tanh ^{-1}(\sin (c+d x))-6 \tan (c+d x) \sec ^3(c+d x)+\tan (c+d x) \left (8 \tan ^2(c+d x)+3\right ) \sec (c+d x)-2 \left (-\tan ^4(c+d x)+\tan ^2(c+d x)+2 \log (\cos (c+d x))\right )\right )}{4 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^2*(a + a*Sin[c + d*x])^2*Tan[c + d*x]^3,x]

[Out]

(a^2*(3*ArcTanh[Sin[c + d*x]] - 6*Sec[c + d*x]^3*Tan[c + d*x] + Sec[c + d*x]*Tan[c + d*x]*(3 + 8*Tan[c + d*x]^
2) - 2*(2*Log[Cos[c + d*x]] + Tan[c + d*x]^2 - Tan[c + d*x]^4)))/(4*d)

________________________________________________________________________________________

fricas [A]  time = 0.49, size = 125, normalized size = 1.44 \[ -\frac {10 \, a^{2} \sin \left (d x + c\right ) - 8 \, a^{2} + {\left (a^{2} \cos \left (d x + c\right )^{2} + 2 \, a^{2} \sin \left (d x + c\right ) - 2 \, a^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + 7 \, {\left (a^{2} \cos \left (d x + c\right )^{2} + 2 \, a^{2} \sin \left (d x + c\right ) - 2 \, a^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right )}{8 \, {\left (d \cos \left (d x + c\right )^{2} + 2 \, d \sin \left (d x + c\right ) - 2 \, d\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^3*(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/8*(10*a^2*sin(d*x + c) - 8*a^2 + (a^2*cos(d*x + c)^2 + 2*a^2*sin(d*x + c) - 2*a^2)*log(sin(d*x + c) + 1) +
7*(a^2*cos(d*x + c)^2 + 2*a^2*sin(d*x + c) - 2*a^2)*log(-sin(d*x + c) + 1))/(d*cos(d*x + c)^2 + 2*d*sin(d*x +
c) - 2*d)

________________________________________________________________________________________

giac [A]  time = 0.26, size = 78, normalized size = 0.90 \[ -\frac {2 \, a^{2} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) + 14 \, a^{2} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac {21 \, a^{2} \sin \left (d x + c\right )^{2} - 22 \, a^{2} \sin \left (d x + c\right ) + 5 \, a^{2}}{{\left (\sin \left (d x + c\right ) - 1\right )}^{2}}}{16 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^3*(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-1/16*(2*a^2*log(abs(sin(d*x + c) + 1)) + 14*a^2*log(abs(sin(d*x + c) - 1)) - (21*a^2*sin(d*x + c)^2 - 22*a^2*
sin(d*x + c) + 5*a^2)/(sin(d*x + c) - 1)^2)/d

________________________________________________________________________________________

maple [B]  time = 0.29, size = 173, normalized size = 1.99 \[ \frac {a^{2} \left (\tan ^{4}\left (d x +c \right )\right )}{4 d}-\frac {a^{2} \left (\tan ^{2}\left (d x +c \right )\right )}{2 d}-\frac {a^{2} \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {a^{2} \left (\sin ^{5}\left (d x +c \right )\right )}{2 d \cos \left (d x +c \right )^{4}}-\frac {a^{2} \left (\sin ^{5}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{2}}-\frac {a^{2} \left (\sin ^{3}\left (d x +c \right )\right )}{4 d}-\frac {3 a^{2} \sin \left (d x +c \right )}{4 d}+\frac {3 a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{4 d}+\frac {a^{2} \left (\sin ^{4}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^5*sin(d*x+c)^3*(a+a*sin(d*x+c))^2,x)

[Out]

1/4/d*a^2*tan(d*x+c)^4-1/2/d*a^2*tan(d*x+c)^2-1/d*a^2*ln(cos(d*x+c))+1/2/d*a^2*sin(d*x+c)^5/cos(d*x+c)^4-1/4/d
*a^2*sin(d*x+c)^5/cos(d*x+c)^2-1/4*a^2*sin(d*x+c)^3/d-3/4*a^2*sin(d*x+c)/d+3/4/d*a^2*ln(sec(d*x+c)+tan(d*x+c))
+1/4/d*a^2*sin(d*x+c)^4/cos(d*x+c)^4

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 72, normalized size = 0.83 \[ -\frac {a^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) + 7 \, a^{2} \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left (5 \, a^{2} \sin \left (d x + c\right ) - 4 \, a^{2}\right )}}{\sin \left (d x + c\right )^{2} - 2 \, \sin \left (d x + c\right ) + 1}}{8 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^3*(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

-1/8*(a^2*log(sin(d*x + c) + 1) + 7*a^2*log(sin(d*x + c) - 1) - 2*(5*a^2*sin(d*x + c) - 4*a^2)/(sin(d*x + c)^2
 - 2*sin(d*x + c) + 1))/d

________________________________________________________________________________________

mupad [B]  time = 9.30, size = 166, normalized size = 1.91 \[ \frac {a^2\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}-\frac {7\,a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}{4\,d}-\frac {a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}{4\,d}-\frac {\frac {3\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{2}-4\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {3\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((sin(c + d*x)^3*(a + a*sin(c + d*x))^2)/cos(c + d*x)^5,x)

[Out]

(a^2*log(tan(c/2 + (d*x)/2)^2 + 1))/d - (7*a^2*log(tan(c/2 + (d*x)/2) - 1))/(4*d) - (a^2*log(tan(c/2 + (d*x)/2
) + 1))/(4*d) - ((3*a^2*tan(c/2 + (d*x)/2)^3)/2 - 4*a^2*tan(c/2 + (d*x)/2)^2 + (3*a^2*tan(c/2 + (d*x)/2))/2)/(
d*(6*tan(c/2 + (d*x)/2)^2 - 4*tan(c/2 + (d*x)/2) - 4*tan(c/2 + (d*x)/2)^3 + tan(c/2 + (d*x)/2)^4 + 1))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**5*sin(d*x+c)**3*(a+a*sin(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________